package com.yuou.model;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

public class Message implements Serializable {
		private static final long serialVersionUID = 1L;
		//消息id	
		private Integer id;  
		//ip地址
		private String ip;  
		//消息内容
		private String content;  
		//消息类型
		private Integer type;  
		//消息状态，1：未读2：已读
		private Integer status;  
		//创建日期
		@DateTimeFormat(pattern="yyyy-MM-dd hh:mm:ss")
		private Date createDate;
		
		public Date getCreateDate() {
			return createDate;
		}

		public void setCreateDate(Date createDate) {
			this.createDate = createDate;
		}

		public Integer getId() {
			return id;
		}

		public void setId(Integer id) {
			this.id = id;
		}

		public String getIp() {
			return ip;
		}

		public void setIp(String ip) {
			this.ip = ip;
		}

		public String getContent() {
			return content;
		}

		public void setContent(String content) {
			this.content = content;
		}

		public Integer getType() {
			return type;
		}

		public void setType(Integer type) {
			this.type = type;
		}

		public Integer getStatus() {
			return status;
		}

		public void setStatus(Integer status) {
			this.status = status;
		}

		@Override
		public String toString() {
			return "Message [id=" + id + ", ip=" + ip + ", content=" + content + ", type=" + type + ", status=" + status
					+ ", createDate=" + createDate + "]";
		}
		
		public Message() {}

		public Message(Integer id, String ip, String content, Integer type, Integer status, Date createDate) {
			super();
			this.id = id;
			this.ip = ip;
			this.content = content;
			this.type = type;
			this.status = status;
			this.createDate = createDate;
		}
		
}
